const route = {
	methods: {
		setVisitRecord(path) {
			// 设置唯一访问码
			this.$cache.put(this.$cache.key.X_VISIT_CODE, new Date().getTime())
			// 获取全部页面
			const pages = this.$cache.get(this.$cache.key.pages, [])
			// 判断当前页面是否存在
			const find = pages.find(item => item.value === path)
			const menuIdKey = this.$cache.key.X_MENU_ID
			const menuId = this.$cache.get(menuIdKey)
			if (find) {
				if (!menuId || menuId !== find.id) {
					this.$cache.put(menuIdKey, find.id)
				}
			} else {
				this.$cache.put(menuIdKey, 1)
			}
		}
	}
}
export default route;
